package com.heima.article;

import com.heima.article.service.ApArticleService;
import com.heima.article.service.AuthorService;
import com.heima.article.service.HotArticleService;
import com.heima.feigns.AdminFeign;
import com.heima.feigns.ArticleFeign;
import com.heima.feigns.WemediaFeign;
import com.heima.model.admin.pojos.AdChannel;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.article.pojos.ApAuthor;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmNews;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
public class Articletest {

    @Autowired
    WemediaFeign wemediaFeign;

    @Autowired
    HotArticleService hotArticleService;
    @Test
    public void articleTest(){
        ResponseResult news = wemediaFeign.updateNews(22);

        System.err.println(news.getData().toString());
    }

    @Autowired
    AuthorService authorService;


    @Test
    public void articleTest1(){
        ApAuthor author = authorService.findApAuthorByUserId(1100);
        System.err.println(author);
    }
    @Autowired
    ApArticleService apArticleService;

    @Test
    public void publishArticle(){
        apArticleService.publishArticle(22);
    }

    @Autowired
    AdminFeign adminFeign;


    @Test
    public void test03(){
        hotArticleService.computeHotArticle();
    }
}
